#include "Djb2Hash.h"

using namespace std;

Djb2Hash::Djb2Hash()
{
}

Djb2Hash::~Djb2Hash()
{
}

unsigned long Djb2Hash::toHash(string base)
{   
        unsigned long hash = 1000000;
        for(int i=0; i < base.length();i++)
            hash = ((hash << 5) + hash) + base[i]; /* hash * 33 + c */

        return hash%1000000;

}
